﻿using log4net;
using log4net.Config;
using log4net.Repository;
using System;
using System.IO;

namespace JZ.JiangSu.Common
{
    public static class LoggerManager
    {
        private const string LoggerName = "NetRepository";
        static LoggerManager()
        {
            ILoggerRepository repository = LogManager.CreateRepository(LoggerName); 
            XmlConfigurator.Configure(repository,new FileInfo("log4net.config"));
        }

        public static ILog GetLogger(Type t)
        {
             return LogManager.GetLogger(LoggerName,t);
        }
    }
}
